﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MVCPets.Models.PetsModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Edit Pet Profile
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeaderContent" runat="server">
  <script src="<%= Url.Content("~/Content/Js/fck/fckeditor.js") %>" type="text/javascript" ></script>

  <script type="text/javascript">
    window.onload = function () {
      var sBasePath = '<%= Url.Content("~/Content/Js/Fck/") %>';
      var oFCKeditor = new FCKeditor('Description', null, null, 'Custom', null);
      oFCKeditor.Height = '400';
      oFCKeditor.BasePath = sBasePath;
      oFCKeditor.ReplaceTextarea();
    }
</script>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Edit Pet Profile</h2>

    <% using (Html.BeginForm()) {%>
        <%= Html.ValidationSummary(true) %>
        
        <fieldset>
            <legend>Fields</legend>
            
            <%= Html.HiddenFor(model => model.ID) %>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Age) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Age) %>
                <%= Html.ValidationMessageFor(model => model.Age) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Breed) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Breed) %>
                <%= Html.ValidationMessageFor(model => model.Breed) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Color) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Color) %>
                <%= Html.ValidationMessageFor(model => model.Color) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Gender) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Gender) %>
                <%= Html.ValidationMessageFor(model => model.Gender) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Name) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Name) %>
                <%= Html.ValidationMessageFor(model => model.Name) %>
            </div>                       
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Fee) %>
            </div>
            <div class="editor-field">
                <%= Html.TextBoxFor(model => model.Fee) %>
                <%= Html.ValidationMessageFor(model => model.Fee) %>
            </div>                       
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Status) %>
            </div>
            <div class="editor-field">
                <%= Html.DropDownListFor(model => model.Status, Model.Statuses) %>
                <%= Html.ValidationMessageFor(model => model.Status) %>
            </div>
            
            <div class="editor-label">
                <%= Html.LabelFor(model => model.Description) %>
            </div>
            <div class="editor-field">
                <%= Html.TextAreaFor(model => model.Description)%>
                <%= Html.ValidationMessageFor(model => model.Description) %>
            </div>                       
            
            <p>
                <input type="submit" value="Save" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%= Html.ActionLink("[Back to List]", "Index", "Pets") %>
    </div>

</asp:Content>